
<%-- 
    Document   : customerEnquiry
    Created on : 2 Nov, 2012, 6:05:15 PM
    Author     : sagar
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../common/script.jsp" %>
<!DOCTYPE html>
<script type="text/javascript">
    var rules=new Array();
    rules[0]='paymentTypeId.paymentTypeId|required|Please Select Payment Type';
</script>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../common/title.jsp" %>
    </head>
    <body style="margin:0; padding:0;" onLoad="yav.init('form1',rules,'inline');">
        <%@include file="../common/header.jsp" %>
        <%@include file="../common/menu.jsp" %>
        <div class="in_02">
            <form:form id="form1" name="form1"  modelAttribute="customer" cssClass="userInputForm" >

                <input type="hidden" name="customerId" value="${customer.customerId}"/>
                <fieldset>
                    <legend><spring:message code="title.customerEnquiry"/></legend>
                    <table class="formTable">
                        <tr>
                            <td width="50%" style="margin: 0; padding: 0;">
                                <table class="formTable">
                                    <tr>
                                        <td>
                                            <fieldset>
                                                <legend><spring:message code="title.customerInfo"/></legend>
                                                <table class="formTable">
                                                    <tr>
                                                        <td><spring:message code="mrNo"/>:<br/> 
                                                            <form:input path="mrNo" cssClass="userInputLarge" readonly="true"/><br/>
                                                        </td>
                                                        <td><spring:message code="patientName"/>:<br/> 
                                                            <form:input path="customerName" cssClass="userInputLarge"/><br/>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td><spring:message code="paymentType"/>:<br/>
                                                            <form:select  path="paymentTypeId.paymentTypeId"  cssClass="userInputMedium">
                                                                <form:option value="" label="-"></form:option>
                                                                <form:options items="${paymentTypeList}" itemLabel="paymentTypeName" itemValue="paymentTypeId"></form:options>
                                                            </form:select><br/>
                                                            <span id="errorsDiv_paymentTypeId.paymentTypeId"></span><br/>
                                                        </td>
                                                        <td><spring:message code="familyCode"/>:<br/> 
                                                            <form:input path="familyCode" cssClass="userInputLarge" readonly="true"/><br/>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td><spring:message code="phone1"/>:<br/> 
                                                            <form:input path="phone1" cssClass="userInputLarge"/><br/>
                                                        </td>
                                                        <td><spring:message code="phone2"/>:<br/> 
                                                            <form:input path="phone2" cssClass="userInputLarge"/><br/>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td><spring:message code="phone3"/>:<br/> 
                                                            <form:input path="phone3" cssClass="userInputLarge"/><br/>
                                                        </td>
                                                        <td><spring:message code="phone4"/>:<br/> 
                                                            <form:input path="phone4" cssClass="userInputLarge"/><br/>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </fieldset>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <fieldset>
                                                <legend><spring:message code="title.updateCustomer"/></legend>
                                                <table class="formTable">
                                                    <tr>
                                                        <td><spring:message code="notes"/>:<br/> 
                                                            <form:textarea path="notes" cssClass="userInputLarge"/><br/>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>&nbsp;</td>
                                                        <td>&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right">
                                                            <input type="submit"  name="button" value="SUBMIT" onclick="return yav.performCheck('form1', rules, 'inline'); " />
                                                        </td>
                                                        <td align="left">
                                                            <input type="button" name="button" value="CANCEL" onclick="location.href='../customer/searchCustomerCommonHeader.htm'"  >
                                                        </td>
                                                    </tr>
                                                </table>
                                            </fieldset>

                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="50%" style="margin: 0; padding: 0;">
                                <table class="formTable">
                                    <tr>
                                        <td style="height:auto; padding: 20px 0 0 20px; font-weight: bold; color: #ff0000;">${msg}</td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div style="width:500px; height:250px; overflow:scroll;">
                                                <fieldset>
                                                    <legend>Customer history</legend>

                                                    <c:forEach items="${customerTrans}" var="item">
                                                        Date : <fmt:formatDate value="${item.lastModifiedDate}" pattern="dd-MM-yy HH:mm"/><br/>
                                                        Agent: ${item.lastModifiedBy.username}<br/>
                                                        Notes: ${item.notes}<br/><br/><br/>
                                                    </c:forEach>

                                                </fieldset>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </form:form>
        </div>

    </body>
</html>
